<?php
namespace ChannelThrift\Service;

use Base\BaseService;

class SystemConfService extends BaseService {
    Protected $autoCheckFields = false;

    /**
     * 获取系统配置
     * @param $name
     * @return bool|mixed
     */
    public static function getConfByName($name)
    {
        if(empty($name)){
           return false;
        }
        $conf =  D("ChannelThrift/Aums/Setting")->where(['name'=>trim($name)])->find();
        return $conf;
    }

    public function getConfByMap($map){
        if(empty($map)){
            return false;
        }
        $confs =  D("ChannelThrift/Aums/Setting")->where($map)->select();
        return $confs;
    }

}
